﻿app.factory('groupFactory', function ($http) {
    var factory = {};
    
    factory.getGroups= function () {
        return $http.get(getGroupsApiAddress);
    };
    factory.postGroup = function (dataPost) {
        return $http.post(postGroupApiAddress, dataPost);
    };
    factory.putGroup = function (dataPost) {
        return $http.post(putGroupApiAddress, dataPost);
    };
    factory.deleteGroup = function (id) {
        return $http.post(deleteGroupApiAddress + id);
    };
    return factory;
});